Integrand size = 29, antiderivative size = 780 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\frac {\sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \text {arctanh}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \text {arctanh}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}} \]
[Out]
Time = 2.38 (sec) , antiderivative size = 780, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {1050, 1044, 214} \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\frac {\sqrt {A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \sqrt {B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \text {arctanh}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )\right )-c x \left (A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e\right )\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {d+e x+f x^2} \sqrt {A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \sqrt {B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}}-\frac {\sqrt {B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \sqrt {A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \text {arctanh}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )\right )-c x \left (A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e\right )\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {d+e x+f x^2} \sqrt {B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \sqrt {A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}} \]
[In]
[Out]
Rule 214
Rule 1044
Rule 1050
Rubi steps \begin{align*} \text {integral}& = -\frac {\int \frac {-a B e-A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )+\left (-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx}{2 \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}+\frac {\int \frac {-a B e-A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )+\left (-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx}{2 \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}} \\ & = \frac {\left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{2 a^2 c \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+a e x^2} \, dx,x,\frac {-a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\sqrt {d+e x+f x^2}}\right )}{\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\left (a \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{2 a^2 c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+a e x^2} \, dx,x,\frac {-a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\sqrt {d+e x+f x^2}}\right )}{\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}} \\ & = \frac {\sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.37 (sec) , antiderivative size = 218, normalized size of antiderivative = 0.28 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\frac {1}{2} \text {RootSum}\left [c d^2+a e^2-4 a e \sqrt {f} \text {$\#$1}-2 c d \text {$\#$1}^2+4 a f \text {$\#$1}^2+c \text {$\#$1}^4\&,\frac {B d \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right )-A e \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right )+2 A \sqrt {f} \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right ) \text {$\#$1}-B \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{a e \sqrt {f}+c d \text {$\#$1}-2 a f \text {$\#$1}-c \text {$\#$1}^3}\&\right ] \]
[In]
[Out]
Time = 0.77 (sec) , antiderivative size = 425, normalized size of antiderivative = 0.54
method | result | size |
default | \(-\frac {\left (-A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (e \sqrt {-a c}+f a -c d \right )}{c}+\frac {\left (-2 \sqrt {-a c}\, f +c e \right ) \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {e \sqrt {-a c}+f a -c d}{c}}\, \sqrt {f \left (x +\frac {\sqrt {-a c}}{c}\right )^{2}+\frac {\left (-2 \sqrt {-a c}\, f +c e \right ) \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {e \sqrt {-a c}+f a -c d}{c}}}{x +\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {e \sqrt {-a c}+f a -c d}{c}}}-\frac {\left (A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (-e \sqrt {-a c}+f a -c d \right )}{c}+\frac {\left (2 \sqrt {-a c}\, f +c e \right ) \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {-e \sqrt {-a c}+f a -c d}{c}}\, \sqrt {f \left (x -\frac {\sqrt {-a c}}{c}\right )^{2}+\frac {\left (2 \sqrt {-a c}\, f +c e \right ) \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {-e \sqrt {-a c}+f a -c d}{c}}}{x -\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {-e \sqrt {-a c}+f a -c d}{c}}}\) | \(425\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 6861 vs. \(2 (703) = 1406\).
Time = 28.21 (sec) , antiderivative size = 6861, normalized size of antiderivative = 8.80 \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\int \frac {A + B x}{\left (a + c x^{2}\right ) \sqrt {d + e x + f x^{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\int { \frac {B x + A}{{\left (c x^{2} + a\right )} \sqrt {f x^{2} + e x + d}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx=\int \frac {A+B\,x}{\left (c\,x^2+a\right )\,\sqrt {f\,x^2+e\,x+d}} \,d x \]
[In]
[Out]